{layout '../Public/layoutForm.latte'}
{block return_actions}{/block}
{block title}我的账户{/block}

{block private_js}
    <script>
        $(function () {
            addressInit("province", "city", "area",{$area[0]},{$area[1]},{$area[2]});
            var leaderSelect = 0;

            $(".leaderSelects").click(function () {
                leaderSelect = $("input[name='leaderSelect']:checked").val();
                if (leaderSelect == 1) {
                    $(".leaderShow").show();
                } else {
                    $(".leaderShow").hide();
                }
            });
        })
    </script>
{/block}
{block private_css}
{/block}

{block content}
    <form id="formArticle" class="stdform mform" method="post" action="{$url}" onsubmit="return false">
        <table cellpadding="0" cellspacing="0" border="0" id="frmtable" class="formtable">
            <thead>
            <tr>
                <td><label>手机号码</label></td>
                <td>
                    <div class="field control-group">
                        <div class="input-group">
                            <input type="text" disabled class="smallinput" value="{$user["phone"]}"/>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td><label>姓名</label></td>
                <td>
                    <div class="control-group ">
                        <div class="field input-group">
                            <input type="text" name="fullName" class="smallinput" value="{$user["fullName"]}"/>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td><label>是否有直线经理</label></td>
                <td>
                    <div class="control-group leaderSelects">
                        <input type="radio" value="1" name="leaderSelect" {if $companyMember['leader']>0}checked{/if}>有
                        <input type="radio" value="0" name="leaderSelect" {if $companyMember['leader']==-1}checked{/if}>无
                    </div>
                </td>
            </tr>
            <tr class="leaderShow" {if $companyMember['leader']==-1}style="display:none" {/if}>
                <td><label>直线经理</label></td>
                <td>
                    <div class="control-group" style="width: 27.7%;">
                        {$executors1|noescape}
                    </div>
                </td>
            </tr>
            <tr>
                <td><label>QQ</label></td>
                <td>
                    <div class="control-group ">
                        <div class="field input-group">
                            <input type="text" name="qq" class="smallinput" value="{$user["qq"]}"/>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td><label>邮箱</label></td>
                <td>
                    <div class="control-group ">
                        <div class="field input-group">
                            <input type="text" name="email" class="smallinput" value="{$user["email"]}"/>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td><label>性别</label></td>
                <td>
                    <div class="control-group ">
                        <div class="field input-group">
                            <label class='radio'><input name='sex' {if $user["sex"]==0 || !$user["sex"]}checked{/if} type="radio" value='0'>未设置</label>
                            <label class='radio'><input name='sex' {if $user["sex"]==1}checked{/if} type="radio" value='1'>男</label>
                            <label class='radio'><input name='sex' {if $user["sex"]==2}checked{/if} type="radio" value='2'>女</label>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td><label>生日</label></td>
                <td>
                    <div class="control-group ">
                        <div class="field input-group">
                            <input type="text" name="birthday" id="birthday" class="smallinput laydate" value="{$user["birthday"]|todate}" format="YYYY-MM-DD"/>
                        </div>
                    </div>
                </td>
            </tr>
            <tr>
                <td><label>地区</label></td>
                <td>
                    <div class="control-group ">
                        <div class="field input-group">
                            <select id="province" name="province"></select>
                            <select id="city" name="city"></select>
                            <select id="area" name="area"></select>
                        </div>
                    </div>
                </td>
            </tr>
            </thead>
        </table>
    </form>
{/block}
